#include "stdafx.h"
#include "TabViewExample.h"

void TabViewExample::loadFile(const String& fileName, FCView *view){
    FCUIXml::loadFile(fileName, view);
    FCTabView *tabView = getTabView(L"TabView");
    //获取第二页
    FCTabPage *tabPage = getTabPage(L"TabPage2");
    FCTabView *tabView2 = new FCTabView();
    FCPoint point = {50, 50};
    tabView2->setLocation(point);
    FCSize size = {400, 300};
    tabView2->setSize(size);
    tabPage->addView(tabView2);
    for (int i = 0; i < 4; i++)
    {
        FCTabPage *newTabPage = new FCTabPage();
        tabView2->addView(newTabPage);
        newTabPage->setText(String(L"TabPage") + FCTran::intToStr(i + 1));
    }
}
